import Vue from 'vue';
import App from './App.vue';
import 'bootstrap/dist/css/bootstrap.css';
import './assets/fonts/iconfont.css';
import MyGoodsList from './views/MyGoodsList.vue';
import MyGoodsSearch from './views/MyGoodsSearch.vue';
import MyUserInfo from './views/MyUserInfo.vue';
// 商品列表-4.1.引入 axios
import axios from 'axios';
// 商品列表-4.2.注册 axios 配置默认地址
axios.defaults.baseURL = 'https://www.escook.cn';
// 商品列表-4.3.把 axios 挂载到 Vue 原型
Vue.prototype.$axios = axios;

import VueRouter from 'vue-router';
Vue.use(VueRouter);
const routes = [
  // {
  //   path: '/',
  //   redirect: '/mygoodslist',
  // },
  {
    path: '/MyGoodsList',
    component: MyGoodsList,
  },
  {
    path: '/mygoodssearch',
    component: MyGoodsSearch,
  },
  {
    path: '/myuserinfo',
    component: MyUserInfo,
  },
];
const router = new VueRouter({
  routes,
});
Vue.config.productionTip = false;

new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app');
